package com.action.ui.activity;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.base.app_core.util.XYBAUtils;
import com.xinglai.yun.R;

public class QrcodeDialog extends Dialog {

    private ImageView ivQrcode;
    private Context context;

    public QrcodeDialog(Context context) {
        super(context, R.style.custom_dialog);
        this.context = context;
        setContentView(R.layout.dialog_qrcode);
        ivQrcode = findViewById(R.id.iv_qrcode);
        ivQrcode.setVisibility(View.VISIBLE);
        this.setCanceledOnTouchOutside(true);
    }

    public void initView(String name, String icon) {
        ((TextView) findViewById(R.id.merName)).setText(name);
        XYBAUtils.displayImage(context, icon, ivQrcode);
    }
}
